package org.huifei.a10_strategy;

/**
 * @author: huifei
 * @date: 2017-08-30 16:58
 */
public class Environment {

    private Strategy strategy;

    public void setStrategy(Strategy strategy) {
        this.strategy = strategy;
    }

    public Environment(Strategy strategy) {
        this.strategy = strategy;
    }

    public int calculate(int a, int b) {
        return strategy.calculate(a, b);
    }
}
